package cn.rokhdelar.ams.business.biz.projectbaseflow.service.impl;

import cn.rokhdelar.ams.business.biz.projectbaseflow.domain.AuditRecord;
import cn.rokhdelar.ams.business.biz.projectbaseflow.mapper.AuditRecordMapper;
import cn.rokhdelar.ams.business.biz.projectbaseflow.service.AuditRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 审核记录服务实现
 */
@Service
public class AuditRecordServiceImpl extends ServiceImpl<AuditRecordMapper, AuditRecord> implements AuditRecordService {

    @Resource
    private AuditRecordMapper auditRecordMapper;

    @Override
    public boolean saveAuditRecord(AuditRecord auditRecord) {
        return save(auditRecord);
    }

    @Override
    public List<AuditRecord> getByProcessInstanceId(String processInstanceId) {
        return auditRecordMapper.selectByProcessInstanceId(processInstanceId);
    }

    @Override
    public AuditRecord getByTaskId(String taskId) {
        return auditRecordMapper.selectByTaskId(taskId);
    }
}
